package com.mes.biz.mapper;

import com.mes.biz.domain.BizOrder;
import com.mes.biz.domain.BizProductionOrder;
import com.mes.common.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.mes.biz.domain.BizOrderProduct;

import java.util.List;

/**
 * 销售单产品Mapper接口
 * @author hwg
 * @email hwg
 * @date 2023-05-15
 */
public interface BizOrderProductMapper extends BaseMapper<BizOrderProduct>
{

    /**
     * 批量删除销售单产品
     * @param ids 需要删除的销售单产品ID集合
     * @return
     */
    public int deleteBizOrderProductByIds(@Param("ids") String[] ids, @Param("DEL_FLAG_DELETE") String DEL_FLAG_DELETE);

    public int deleteBizProductByOrderId(@Param("orderId") String orderId, @Param("DEL_FLAG_DELETE") String DEL_FLAG_DELETE);


    List<BizOrderProduct> getBizOrderProductByOrderId(@Param("orderId") String orderId);

    //工序交接-商品明细
    List<BizOrderProduct> getProcessDetailList(@Param("orderId") String orderId);

    //查询产品还剩下的工序
    List<String> getProcessIdByProductId(@Param("productId") String productId, @Param("orderId") String orderId, @Param("orderProductId") String orderProductId);


    List<BizOrderProduct> getNotInventoryByOrderId(@Param("orderId") String orderId);

    List<BizOrderProduct> listOrderProduct(BizOrder bizOrder);

    List<BizOrderProduct> getProductByOrderId(@Param("orderId") String orderId);
}
